extends Node2D

class_name Home

var isDoor01Covered = false


# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	if Input.is_action_just_pressed("Interect") and isDoor01Covered:
		Global.movePlayerToScene("homeOutsideScene", "Enter_01")


func _on_door_01_body_entered(body):
	if body.is_in_group("Player"):
		isDoor01Covered = true


func _on_door_01_body_exited(body):
	if body.is_in_group("Player"):
		isDoor01Covered = false
